package com.rock.code.bigdata.type.controller;

import com.github.pagehelper.PageInfo;
import com.rock.code.base.controller.BaseController;
import com.rock.code.base.domain.AjaxJson;
import com.rock.code.base.domain.Constants;
import com.rock.code.bigdata.type.domain.TbSysType;
import com.rock.code.bigdata.type.service.TbSysTypeService;
import com.rock.code.common.exceptions.SystemException;
import com.rock.code.common.pager.Page;
import com.rock.code.system.module.domain.TbSysModule;
import com.rock.code.system.role.domain.TbSysRole;
import com.rock.code.system.roleModule.domain.TbSysRoleModule;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author piandu
 * @description 资源
 * @date 2018/9/14 16/34
 */
@Controller
@RequestMapping("/KbpResourceData")
public class TbSysTypeController extends BaseController {

    @Resource
    private TbSysTypeService tbSysTypeServiceImpl;

    /**
     * queryPageListType
     * 资源展示
     *
     * @return the page info
     * @throws Exception the exception
     */
    @ResponseBody
    @RequestMapping(value = "/queryPageListType", method = RequestMethod.POST)
    public PageInfo<TbSysType> queryPageListType() throws Exception {
        Map<String, Object> param = this.getRequestMapSingle();
        Page page = new Page(request);
        PageInfo pageInfo = null;
        try {
            pageInfo = tbSysTypeServiceImpl.queryPageListType(page, param);
        } catch (Exception e) {
            e.printStackTrace();
            throw new SystemException(e);
        }
        return pageInfo;
    }
}
